<?xml version="1.0" encoding="UTF-8"?>
<!-- WARNING: This file has been updated into version 1.1.1 in order to enable compilation of GP Messaging 1.2.0.
Modifications are temporary modification: to be handled by the System Committee -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gp="http://namespaces.globalplatform.org/systems-profiles/1.1.2" targetNamespace="http://namespaces.globalplatform.org/systems-profiles/1.1.2" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xsd:include schemaLocation="GP.systems.profiles.1.1.2.Common.xsd"/>
	<xsd:element name="Attribute">
		<xsd:annotation>
			<xsd:documentation>The attribute of a key which references the Key Profile.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:attribute name="Importable" type="xsd:boolean" use="optional">
				<xsd:annotation>
					<xsd:documentation>The key represented by the key profile can be imported.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Exportable" type="xsd:boolean" use="optional">
				<xsd:annotation>
					<xsd:documentation>The key represented by the key profile can be exported.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Sensitive" type="xsd:boolean" use="optional">
				<xsd:annotation>
					<xsd:documentation>Whether there are restrictions on the manner in which keys can be exported.  Restrictions will include whether the key must be exportable in a wrapped state.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Value">
		<xsd:annotation>
			<xsd:documentation>The components and format of the key represented by the Key Profile.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="gp:Component" maxOccurs="unbounded"/>
			</xsd:sequence>
			<xsd:attribute name="Format" type="gp:valueFormat" use="optional"/>
			<xsd:attribute name="arrayElement" type="gp:arrayList" use="required"/>
			<xsd:attribute name="arrayIndex" type="gp:indexList" use="required"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Component">
		<xsd:annotation>
			<xsd:documentation>Components for CRT formatted key values.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:attribute name="Name" type="gp:componentName" use="optional">
				<xsd:annotation>
					<xsd:documentation>Name of the component.  If the Format attribute of the parent element is CRT, this is the CRT component.  If the Format attribute of the parent element is MOD_EXP or DES, then Name is not required.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Order" type="xsd:integer" use="optional">
				<xsd:annotation>
					<xsd:documentation>For CRT components, numeric order of the component.  This attribute should be unique amongst all components.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Value" type="xsd:string" use="optional">
				<xsd:annotation>
					<xsd:documentation>Value of the component.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Encoding" type="gp:encoding" use="optional">
				<xsd:annotation>
					<xsd:documentation>Encoding of the component</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="KCV" type="xsd:hexBinary" use="optional">
				<xsd:annotation>
					<xsd:documentation>Hexadecimal representation of the key check value.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="KeyInfo">
		<xsd:annotation>
			<xsd:documentation>General information which a key which references the Key Profile inherits.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="gp:KeyPart" minOccurs="0"/>
				<xsd:element ref="gp:TransportKey" minOccurs="0"/>
			</xsd:sequence>
			<xsd:attribute name="Name" type="xsd:string" use="optional">
				<xsd:annotation>
					<xsd:documentation>Free text field.  Not necessarily unique amongst all key profiles.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="ID" type="xsd:hexBinary" use="optional">
				<xsd:annotation>
					<xsd:documentation>OID used to ID the key to be used during script processing, OID root will not be the same as the Key Profile ID.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Type" type="gp:keyCategory" use="required">
				<xsd:annotation>
					<xsd:documentation>Valid values:SECRET (symmetric)PRIVATE (asymmetric)PUBLIC (asymmetric)</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="SubType" type="gp:keysubtype" use="required">
				<xsd:annotation>
					<xsd:documentation>"The type of key:DESKeyRSAPrivateCrtKeyRSAPrivateKeyRSAPublicKeyAESKeyECPrivateKeyECPublicKeyNote : Certificates are treated as Data objects.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Size" type="xsd:integer" use="optional">
				<xsd:annotation>
					<xsd:documentation>If a value is specified for the key in the key profile, then the Size attribute must be specified.For RSA key, the modulus size in bits.For DES key, the length in bits including parity bits.  For example, a single length DES key is 64 bits, a double length DES key is 128 bits, and a triple length DES key is 192 bits.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Exponent" type="xsd:integer" use="optional">
				<xsd:annotation>
					<xsd:documentation>Exponent value for the RSA key.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Owner" type="xsd:hexBinary" use="optional"/>
			<xsd:attribute name="Version" type="xsd:hexBinary" use="optional">
				<xsd:annotation>
					<xsd:documentation>To support legacy systems using Key Name and Key Version.  Hex value representation of numeric value of version.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="StartDate" type="xsd:date" use="optional"/>
			<xsd:attribute name="EndDate" type="xsd:date" use="optional"/>
			<xsd:attribute name="RecovationDate" type="xsd:date" use="optional">
				<xsd:annotation>
					<xsd:documentation>Revocation date for the Key Profile in the format YYYYMMDD.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="KCVAlgorithm" type="gp:kcvalgorithmtype" use="optional">
				<xsd:annotation>
					<xsd:documentation>Algorithm used to apply to the key check value for the key or key part represented by the Key Profile.  EIGHTZEROS (calculated by encrypting a block of zeros)</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="KCVSize" type="xsd:integer" use="optional">
				<xsd:annotation>
					<xsd:documentation>Length in nibbles of Key Check Value.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Mode" type="gp:mode" use="optional">
				<xsd:annotation>
					<xsd:documentation>Provides information about whether a key is intended for TEST or PRODUCTION environments.Valid value:	TEST	PRODUCTION</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<!-- WARNING: This simple type has been renamed from "keytype" to "keyCategory" in order to enable compilation of GP Messaging 1.2.0.
			This is a temporary modification: to be handled by the System Committee -->
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="KeyPart">
		<xsd:annotation>
			<xsd:documentation>For secret keys, element to describe number of parts as well as part number.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:attribute name="NumberOfParts" type="xsd:integer" use="optional">
				<xsd:annotation>
					<xsd:documentation>Total number of parts making up the secret key.For example, if Key Profile represented the entire secret key, NumberOfParts could be used to specify number of consituent parts used to construct the secret key.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="PartNumber" type="xsd:integer" use="optional">
				<xsd:annotation>
					<xsd:documentation>Individual component number.  Should be unique amongst all individual key parts for a particular secret key.If order is required, then this PartNumber attribute can also be used to imply order of constructing the secret key as well as identifying the individual part number.For example, if Key Profile represented a key part used to construct a secret key, PartNumber could be used to specify to specify an unique part number.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Algorithm" type="gp:keypartalgorithm" use="optional">
				<xsd:annotation>
					<xsd:documentation>Algorithm used for constructing the secret key from the individual components.Valid values are: XOR CONCATE</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="KeyProfile">
		<xsd:annotation>
			<xsd:documentation>Parent or root element for a Key Profile.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="gp:Description" minOccurs="0"/>
				<xsd:element ref="gp:Revisions"/>
				<xsd:element ref="gp:KeyInfo"/>
				<xsd:element ref="gp:Attribute"/>
				<xsd:element ref="gp:Usage"/>
				<xsd:element ref="gp:Value" minOccurs="0"/>
			</xsd:sequence>
			<xsd:attribute name="UniqueID" type="gp:uniqueID" use="required">
				<xsd:annotation>
					<xsd:documentation>The Identifier of the Key Profile as per Unique ID definition in Profiles Specification. </xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="ProfileVersion" type="gp:version" use="required"/>
			<xsd:attribute name="ErrataVersion" type="xsd:integer" use="optional"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="TransportKey">
		<xsd:annotation>
			<xsd:documentation>The TransportKey element is used to describe the transport key used for exporting the key described be the key profile.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:attribute name="ID" type="gp:uniqueID" use="optional">
				<xsd:annotation>
					<xsd:documentation>ID of the Transport Key.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Name" type="xsd:string" use="optional">
				<xsd:annotation>
					<xsd:documentation>Name of the Transport Key.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Owner" type="xsd:hexBinary" use="optional">
				<xsd:annotation>
					<xsd:documentation>Owner of the Transport Key.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Version" type="xsd:hexBinary" use="optional">
				<xsd:annotation>
					<xsd:documentation>Version of the Transport Key.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Algorithm" type="gp:tkalgorithm" use="optional">
				<xsd:annotation>
					<xsd:documentation>Algorithm used with the Transport Key when exporting a key.Valid values are:	CBC	ECB</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="AlgorithmParameters" type="xsd:hexBinary" use="optional">
				<xsd:annotation>
					<xsd:documentation>If present, represents the initial vector to be used if Algorithm attribute is CBC.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Usage">
		<xsd:annotation>
			<xsd:documentation>Cryptographic operations which can be performed with a key which references the Key Profile.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:attribute name="Encrypt" type="xsd:boolean" use="optional"/>
			<xsd:attribute name="Decrypt" type="xsd:boolean" use="optional"/>
			<xsd:attribute name="DecryptEncrypt" type="xsd:boolean" use="optional"/>
			<xsd:attribute name="Sign" type="xsd:boolean" use="optional"/>
			<xsd:attribute name="Verify" type="xsd:boolean" use="optional"/>
			<xsd:attribute name="Wrap" type="xsd:boolean" use="optional"/>
			<xsd:attribute name="Unwrap" type="xsd:boolean" use="optional"/>
			<xsd:attribute name="UnwrapWrap" type="xsd:boolean" use="optional"/>
			<xsd:attribute name="Derive" type="xsd:boolean" use="optional"/>
		</xsd:complexType>
	</xsd:element>
</xsd:schema>
